<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>修改用户</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/bootstrap.css">
    <script src="js/bootstrap.js"></script>
    <script src="js/jquery-3.3.1.js"></script>
    <style type="text/css">
        .content {
            padding: 16px;
            width: 300px;
            margin: auto;
        }
    </style>
</head>
<body>
<div class="content">
    <form class="form-horizontal" role="form" method="post" action="/users">
        <input style="display: none" name="method" value="modifyuser">
        <input style="display: none" name="id" value="${user.id}">
        <input style="display: none" name="dianhua" value="${user.dianhua}">
        <div class="form-group">
            <label for="disabledInput" class="col-sm-2 control-label">
                用户ID
            </label>
            <div class="col-sm-10">
                <input name="id" value="${user.id}" class="form-control" id="disabledInput" type="text" placeholder="ID"
                       disabled>
            </div>
        </div>

        <div class="form-group">
            <label for="firstname" class="col-sm-2 control-label">电话号码</label>
            <div class="col-sm-10">
                <input name="dianhua" value="${user.dianhua}" type="text" class="form-control" id="firstname"
                       placeholder="电话号码" disabled>
            </div>
        </div>

        <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input name="mima" value="${user.mima}" type="text" class="form-control" id="lastname" placeholder="密码">
            </div>
        </div>

        <div class="form-group">
            <label for="zhifubao" class="col-sm-2 control-label">支付宝</label>
            <div class="col-sm-10">
                <input name="zhifubao" value="${user.zhifubao}" type="text" class="form-control" id="zhifubao"
                       placeholder="支付宝">
            </div>
        </div>

        <div class="form-group">
            <label for="zhenming" class="col-sm-2 control-label">真实姓名</label>
            <div class="col-sm-10">
                <input name="zhenming" value="${user.zhenming}" type="text" class="form-control" id="zhenming"
                       placeholder="真实姓名">
            </div>
        </div>

        <!-- 存在不可控风险，故取消这个接口-->
        <div class="form-group" style="display: none">
            <label for="keyong" class="col-sm-2 control-label">可提余额</label>
            <div class="col-sm-10">
                <input name="keyong" value="${user.keyong}" type="text" class="form-control" id="keyong"
                       placeholder="可提余额">
            </div>
        </div>

        <div class="col-sm-offset-2 col-sm-10">
            <label class="radio-inline">
                <c:choose>
                <c:when test="${user.frozen=='no'}">
                <input type="radio" name="frozen" id="optionsRadios3" value="no" checked>不冻结
            </label>
            <label class="radio-inline">
                <input type="radio" name="frozen" id="optionsRadios4" value="yes">冻结
                </c:when>
                <c:otherwise>
                <input type="radio" name="frozen" id="optionsRadios3" value="no">不冻结
            </label>
            <label class="radio-inline">
                <input type="radio" name="frozen" id="optionsRadios4" value="yes" checked>冻结
                </c:otherwise>
                </c:choose>

            </label>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <br>
                <button type="submit" class="btn btn-default">修改</button>
            </div>
        </div>
    </form>
</div>
</body>
</html>
